// #include "AnimationComp.h"
// #include <SECore/Ecs/Actor.h>
// #include <SEngine/Ecs/TypeRegister.h>
// #include <SEngine/Ecs/Components/AllComponents.h>
// #include <SECore/Reflect.h>

// #include <SEDebug/Log/Log.h>

// namespace SEngine
// {
//     AnimationComp::AnimationComp(Actor &actor)
//         : Component(actor)
//     {
//         actor.AddComponentSignal.AddSlot([this](IComponent & comp) { this->OnAddComponent(comp); return SlotState::Keep; });
//         actor.RemoveComponentSignal.AddSlot([this](IComponent & comp) { this->OnRemoveComponent(comp); return SlotState::Keep; });
//     }

//     void AnimationComp::OnUpdate(int delta)
//     {
//     }

//     void AnimationComp::Attach()
//     {
//         ForeachType([this](auto loader) {
//             if (this->m_actor.HasComponent<decltype(loader)::Type>()) {
//                 Reflect<decltype(loader)::Type> info;
//                 std::string name = info.Name();
//                 info.ForeachField([&](auto field) {
//                     if constexpr (AnimParamters().HasType<decltype(field)::Type>()) {
//                         this->m_properties[name].emplace(field.name, std::make_shared<AnimParamter<decltype(loader)::Type, decltype(field)>>(this->m_actor, field));
//                     }
//                 });
//             }
//         }, AllComponents{});
//     }

//     void AnimationComp::OnAddComponent(IComponent& comp)
//     {
//         ForeachType([this, &comp](auto loader) {
//             if (dynamic_cast<decltype(loader)::Type*>(&comp)) {
//                 Reflect<decltype(loader)::Type> info;
//                 std::string name = info.Name();
//                 info.ForeachField([&](auto field) {
//                     if constexpr (AnimParamters().HasType<decltype(field)::Type>()) {
//                         this->m_properties[name].emplace(field.name, std::make_shared<AnimParamter<decltype(loader)::Type, decltype(field)>>(this->m_actor, field));
//                     }
//                 });
//             }
//         }, AllComponents{});
//     }

//     void AnimationComp::OnRemoveComponent(IComponent& comp)
//     {
//         ForeachType([this, &comp](auto loader) {
//             if (dynamic_cast<decltype(loader)::Type*>(&comp)) {
//                 Reflect<decltype(loader)::Type> info;
//                 this->m_properties.erase(info.Name());
//             }
//         }, AllComponents{});
//     }
// }